Skip to content

Desktop: Share chat… as a redacted file, secret gist only after a confirm (ATO-581) - #1663

Draft
sosidudku1 wants to merge 2 commits into
rel/xp-buildfrom
feat/ato-581-desktop-share-chat
Draft

sosidudku1 wants to merge 2 commits into
rel/xp-buildfrom
feat/ato-581-desktop-share-chat

Conversation

@sosidudku1

@sosidudku1 sosidudku1 commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

What

"Share chat…" in a chat's "…" menu (right under Export…, for a stored chat):

  1. A save dialog picks where (web page or Markdown).
  2. The agent writes one redacted file with atag share --session <id> --format html|md --out <file> --json (core Share a chat as one redacted file, with an opt-in secret gist (ATO-581) #1445): only your messages and the agent's replies; keys, local paths, emails, IPs and reasoning are removed.
  3. A dialog says how many messages are in it and what was removed, with Done / Show in folder / Create secret gist….
  4. "Create secret gist…" opens a second confirm (Cancel is the default button) that says anyone with the link can open a secret gist. Only "Upload" runs gh gist create <file> --desc "Atomic Agent chat: <title>": a secret gist (never --public, pinned by a test), with the person's own gh sign-in. An HTML save uploads a Markdown copy written by the same command, because GitHub shows HTML as source; that copy is written before the confirm, which names its path and message count, and exactly that file goes up. The link is copied and can be opened from the last dialog.

New files: desktop/main/chat-share.ts, desktop/renderer/chat-share.js, desktop/test/chat-share.test.mjs. Hooks: one IPC registration in main.ts, one preload method (shareSession), one menu item in chat-list.js, one line in renderer.js act(), one <script> in index.html.

The bundled core on rel/xp-build already has atag share (src/cli/share-command.ts, registered in src/cli/index.ts). An agent without it gets "This agent version cannot share chats. Update Atomic Agent." A window connected to a remote agent is refused in words (the command reads this computer's chat store).

Why

ATO-581 / ATO-1504: the core can share a chat, the desktop could not. Core #1445 named the desktop button as not done.

How

Copied ChatGPT / Claude "Share chat" (a look at what goes out, then a link) and Claude Code /export (a local file first). Unlike them there is no host of ours, so the only way off the machine is the person's own secret gist, asked twice. Same shape as the existing Export… (ATO-1054).

Tests

  • desktop/test/chat-share.test.mjs: the argv to atag share; nothing uploads by default, on the offer alone or on Cancel; the confirm defaults to Cancel; after both yeses the gh argv is a secret gist of the Markdown copy and the link is copied; gh missing / signed out keeps the file and says why; cancel, bad id (an id starting with - is refused), remote agent, old agent; the IPC channel; the menu item.
  • desktop/test/chat-export.test.mjs: menu order updated for the new item.
  • Not run on this Mac (rule); npm run build && npm run test:unit in desktop/ is the check.

Unverified: the native dialogs by hand, and gh found via the app PATH (agentEnv, which appends Homebrew's folder) on a Finder-launched app.

Verification

  • Review found: for an HTML save (the default) the Markdown copy for the gist was written after the Upload answer, at a path the dialogs never named, while the confirm said to open the saved file to read exactly what goes up. A chat that grew in the meantime could also upload more messages than the dialog showed.
  • Changed: the Markdown copy is now written as soon as "Create secret gist…" is picked, before the confirm. The confirm names that file's path and message count (for a Markdown save, the saved file itself), and exactly that file is passed to gh gist create. Nothing is regenerated after the yes. Same redaction, same command.
  • Tests: chat-share.test.mjs adds a case where every later atag share run would return a new file with more messages; it asserts only two agent runs, the confirm names the first Markdown copy and its count, and gh gets that file. The Markdown save case checks the confirm names the saved file.
  • MBP run must check: npm run build && npm run test:unit in desktop/ (chat-share tests), and by hand an HTML save, then Create secret gist…: the confirm shows the Markdown path and count, Cancel uploads nothing.

Not yet checked on the second Mac.

…d that file

For an HTML save the Markdown copy for the gist was written after the
Upload answer, so the confirm never named the file that went up and a
chat that grew in the meantime could upload more messages than shown.
The copy is now written first, the confirm names its path and message
count, and exactly that file is uploaded.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant